<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.util.*" errorPage="/error.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page import="com.beans.photo.*"%>
<%@ page import="com.business.photo.*" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>修改图片</title>
<style type="text/css">
<!--
.STYLE1 {
	color: #FF0000;
	font-weight: bold;
}
.STYLE2 {color: #000000}
-->
</style>

<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body style="	font-size: 9pt;
	line-height: 150%;
	color: #000000;
	text-decoration: none;">
<%	
	String photoNo=request.getParameter("no");
	PhotoListBus plb=new PhotoListBus();
	PhotoDetail pd=plb.getPhotoByNo(photoNo);
%>
<form action="/managephoto" method="post" enctype="multipart/form-data" name="addphotoform" id="addphotoform">
  <p><b>您将修改图片相关信息</b></p>
  <p>图片名：
    <label>
    <input name="photoname" type="text" id="photoname" value="<%=pd.getPhotoName()%>"/>
    </label>
  </p>
  <p >备注：</p>
  <label>
  <textarea name="photomemo" cols="40" rows="4" id="photomemo" ><%=pd.getPhotoMemo()%></textarea>
  </label>
  <p class="STYLE2">所在相册：
    <label>
	<select name="phototypeid" >
	<%	
	PhotoTypeBus ptl=new PhotoTypeBus();
	String username=pd.getUsername();
	List typeList=ptl.getAllTypes(username);
	for(int i=0;i<typeList.size();i++) {
	PhotoType pt=(PhotoType)typeList.get(i);
	%>
	<option value="<%=pt.getPhototypeId()%>" <%if(pd.getPhototypeId().equals(pt.getPhototypeId())) {%>selected<%}%>><%=pt.getPhototypeName()%></option>
	<%
	}
	%>
	</select>
	</label>
  </p>
  <p>是否显示
    <label>
    <input name="isshow" type="checkbox" id="isshow" value="1" <%if(pd.getIsShow().equals("1")){%>checked="checked" <%}%>/>
    </label>
       <input name="username" type="hidden" id="username" value="<%=username%>" />
	   <input name="no" type="hidden" value="<%=photoNo%>"/>
	   <input name="replycount" type="hidden" value="<%=pd.getReplyCount()%>" />
	   <input name="viewcount" type="hidden" value="<%=pd.getViewCount()%>" />
	   <input name="action" type="hidden" value="edit" />
  </p>
  <p>
    <label>请选择上传的图片文件：
    <input type="file" name="file" />
	<input name="photourl" type="hidden" value="<%=pd.getPhotoUrl()%>" />
    </label>
  </p>

  <p>
   <label>
		<br />
  <center> <input type="submit"  value=" 提交 "></center>
      </label>
</p>
</form>
</body>
</html>
